package com.jkl.dao.drTable;

import java.util.List;

import com.jkl.entity.bsAddition.BsAddition;
import com.jkl.entity.bsWorkflowLog.BsWorkflowLog;
import com.jkl.entity.drIndex.DrIndex;
import com.jkl.entity.drIndexFormula.DrIndexFormula;
import com.jkl.entity.drTable.DrTable;
import com.jkl.entity.drTableDetail.DrTableDetail;
import com.jkl.entity.drTemplate.DrTemplate;
import com.jkl.entity.drTemplateDetail.DrTemplateDetail;

import tk.mybatis.mapper.common.Mapper;

public interface DrTableMapper extends Mapper<DrTable> {
	//查询上报主表
	List<DrTable> drTableById(DrTable drTable);
	List<DrTable> drTableByIdLevel(DrTable drTable);
	List<DrTable> drTableByIdLevelQu(DrTable drTable);
	
	//生成表查询 
	List<DrTable> drTableListId(DrTable drTable);
	List<DrTable> drTableListIdLevel(DrTable drTable);
	List<DrTable> drTableListIdLevelQu(DrTable drTable);
	//重复查询  
	List<DrTable> drTableList(DrTable drTable);
	//修改状态
	int updateWorkflowCode (DrTable drTable);
	//修改是否启用
	int updateStatus (DrTable drTable);
	int addDrTable(DrTable drTable);

	List<DrTable> queryExistDrTable(DrTable drTable);
	
	//table删除
	int deleteTable(int param);
	//tabledetail删除
	int deleteTableDetail(int param);
	//workflowlog删除
	int deleteTableLog(int param);
	int addTableDetail(DrTableDetail tabledeta);
	DrTemplate queryTemplate(int id);
	int addTemplate(DrTemplate template);
	int setTemplateDetailStatus(int id);
	void addTemplateDetail(DrTemplateDetail templateDetail);
	DrTemplateDetail queryTemplateDetail(int tableId,String indexCode);
	int setTemplateDetailStatus2(int id);
	DrIndex queryIndex(int id);
	int addIndex(DrIndex index);
	int updateIndex(DrIndex index);
	DrIndexFormula queryIndexFormula(int id);
	int addIndexFormula(DrIndexFormula indexformu);
	int updateIndexFormula(DrIndexFormula indexformu);
	BsWorkflowLog[] queryworkflowLogs(int id);
	BsAddition queryBsAddition(int id);
	DrTableDetail[] queryTableDetails(int id);
	DrTable queryTable(int id);
	int updateTable(DrTable table);
	DrTableDetail queryTableDetail(int id);
	int addBsWorkflowLog(BsWorkflowLog bsWorkflowLog);
	int updateTableLog(int id);
}